tests/lzma: Fix off-by-one in buffer size
authorColin Walters <walters@verbum.org>
Mon, 31 Jul 2017 14:05:04 +0000 (10:05 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 2 Aug 2017 15:34:16 +0000 (15:34 +0000)
commitfe8938227e767ab85bc4f1d599032165aa2bf133
tree1947a906e834db7943a8a874baa7cef9cf36d449
parente70db67c018f34f404ae9ef5a992e7a67d377301
tests/lzma: Fix off-by-one in buffer size

Coverity spotted that we had an off-by-one here since we were using
`i+1`.  Fix this by adding a `-1` to the bounds check.  Also use
`sizeof()` to ensure the data and size are coupled.

Coverity CID: 1452207

Closes: #1037
Approved by: jlebon
tests/test-lzma.c